package cm.dpassyann.speedDating.model.bean.user;

import java.io.Serializable;

import cm.dpassyann.speedDating.model.bean.address.Address;

/**
 * 
 * Pour le projet : amour-me-zam-android
 * @author deungoueyann
 * @description cette classe permet de stocker toutes les caractéristiques d'un utilisateur
 * @date fait le : 22 nov. 2012
 */
public class User implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -2155604655443525267L;
	
	private Long id;
	private String email;
	private String birthday;
	private boolean actived;
    private Address address;
    private ConnectionParameter parameter;
	
	public User(Long id, ConnectionParameter parameter, String username, String password, Address address, String email, String birthday) {
		this.id = id;
		this.address = address;
		this.email = email;
		this.birthday = birthday;
		this.parameter = parameter;
	}
	
	public  User(){
		this.id = new Long(-1);
		this.address = new Address();
		this.email = "";
		this.birthday = "";
		this.parameter = new ConnectionParameter();
	}
	
	/**
	 * @return la id
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @param id la id à initialiser
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * @return la email
	 */
	public String getEmail() {
		return email;
	}

	/**
	 * @param email la email à initialiser
	 */
	public void setEmail(String email) {
		this.email = email;
	}

	/**
	 * @return la birthday
	 */
	public String getBirthday() {
		return birthday;
	}

	/**
	 * @param birthday la birthday à initialiser
	 */
	public void setBirthday(String birthday) {
		this.birthday = birthday;
	}

	/**
	 * @return la address
	 */
	public Address getAddress() {
		return address;
	}

	/**
	 * @param address la address à initialiser
	 */
	public void setAddress(Address address) {
		this.address = address;
	}

	/**
	 * @return la actived
	 */
	public boolean isActived() {
		return actived;
	}

	/**
	 * @param actived la actived à initialiser
	 */
	public void setActived(boolean actived) {
		this.actived = actived;
	}

	/**
	 * @return la parameter
	 */
	public ConnectionParameter getParameter() {
		return parameter;
	}

	/**
	 * @param parameter la parameter à initialiser
	 */
	public void setParameter(ConnectionParameter parameter) {
		this.parameter = parameter;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("User [\nid  --> ");
		builder.append(id);
		builder.append("\nemail  --> ");
		builder.append(email);
		builder.append("\nbirthday  --> ");
		builder.append(birthday);
		builder.append("\nactived  --> ");
		builder.append(actived);
		builder.append("\naddress  --> ");
		builder.append(address);
		builder.append("\nparameter  --> ");
		builder.append(parameter);
		builder.append("\n]");
		return builder.toString();
	}
}
